<?php
require_once('includes/header_avant_html.php');

$module 		= (isset($_GET['mod']))?htmlspecialchars($_GET['mod']):'';
$action 		= (isset($_GET['act']))?htmlspecialchars($_GET['act']):'';
$view['erreur'] = (isset($_GET['el']))?htmlspecialchars($_GET['el']):'';

$view['module'] = $module;
$view['action'] = $action;

if(isset($module) && !empty($module))
{
	if(file_exists(ROOT_PATH.'includes/modules/'.$module.'/'.$action.'.php'))
	{
		include('includes/modules/'.$module.'/'.$action.'.php');
	}
	else
	{
		$template = $twig->loadTemplate('error/modules.html');
		echo $template->render($view);
	}
}
else
{
	header("Location: index/index.html");
}
?>